import { request } from '@/utils/request';

const Api = {
  List: '/member/bank/list',
  add: '/member/bank',
  info: '/member/bank',
};

// 列表
export function getList(params: any) {
  return request.get({
    url: Api.List,
    params,
  });
}

// 添加
export function add(data: any) {
  return request.post({
    url: Api.add,
    data,
  });
}

// 详情
export function getInfo(id: number | string) {
  return request.get({
    url: `${Api.info}/${id}`,
  });
}

// 修改
export function edit(data: any) {
  return request.put({
    url: Api.add,
    data,
  });
}

// 删除
export function Delete(id: number | string) {
  return request.delete({
    url: `${Api.add}/${id}`,
  });
}
